#include <stdio.h>
#include <sys/time.h>
#include "../xtime.h"

int main(void)
{
    char *current_time;
    current_time = NowDateTimeStr();
    printf("NowDateTimeStr: %s\n", current_time);

    int year, month, day;
    NowYMD(&year, &month, &day);
    printf("year: %d, month: %d, day: %d\n", year, month, day);

    int hour, minute, second;
    NowHMS(&hour, &minute, &second);
    printf("hour: %d, minute: %d, second: %d\n", hour, minute, second);

    NowYMDHMS(&year, &month, &day, &hour, &minute, &second);
    printf("year: %d, month: %d, day: %d, hour: %d, minute: %d, second: %d\n", year, month, day, hour, minute, second);

    long tsSecond;
    NowTimestamp(&tsSecond);
    printf("tsSecond: %ld\n", tsSecond);

    long long tsMillisecond;
    NowTimestampMS(&tsMillisecond);
    printf("tsMillisecond: %lld\n", tsMillisecond);

    return 0;
}
